package com.qingfeng.medical.biz.message.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qingfeng.currency.dozer.DozerUtils;
import com.qingfeng.medical.biz.message.dao.NewsNotifyMapper;
import com.qingfeng.medical.biz.message.domain.dto.NewsNotifySaveDTO;
import com.qingfeng.medical.biz.message.domain.entity.NewsNotify;
import com.qingfeng.medical.biz.message.service.NewsNotifyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 消息通知表
 *
 * @author 清风学Java
 * @date 2023-05-03 22:53:02
 */
@Service
public class NewsNotifyServiceImpl extends ServiceImpl<NewsNotifyMapper, NewsNotify> implements NewsNotifyService {

    @Autowired
    private DozerUtils dozerUtils;

    /**
     * 保存消息通知信息
     *
     * @param newsNotifySaveDTO
     */
    @Override
    public void saveNewsNotify(NewsNotifySaveDTO newsNotifySaveDTO) {
        // 直接进行保存
        baseMapper.insert(dozerUtils.map2(newsNotifySaveDTO, NewsNotify.class));
    }
}